The present invention relates to an apparatus and method for compressing and decompressing digital video data including still and active images. More particularly, the present invention relates to an apparatus and method for coding and decoding video data on an intraframe basis by detecting similar patterns in adjacent blocks of data.
The Korean Patent Application No. 10614 (Jun. 18, 1992) from which a claim to priority is made is incorporated herein by reference.
In general, video data systems employ coding/decoding systems for compressing both video and audio signals to reduce the amount of data to be transmitted and/or stored. The use of such coding/decoding systems continues to increase. The coding system codes the video and audio signal into digital data, which is then stored in a memory or transmitted to a receiver. The decoding system after receiving the coded data or retrieving the coded data from memory decodes the coded digital data to reconstruct the original video and audio signal. There are several methods known for implementing such coding/decoding techniques including DPCM (Differential Pulse Code Modulation), Vector Quantizer, and Variable Length Coding as examples. In effect, these methods remove redundant data in the video and audio signal, thus compressing the data.
Generally, in order to code a signal, each frame of video data is divided into blocks of a predetermined size. Each block of data or block of differential data is then transformed by an orthogonal transformation technique to produce transformation coefficients in the frequency domain. There are several known methods of implementing the orthogonal transformation technique including DCT (Discrete Cosine Transform), WHT (Walsh-Hadamard Transform), DFT (Discrete Fourier Transform), and DST (Discrete Sine Transform). The transformation coefficients, which are obtained by one of these transformation methods, are changed into predetermined representative values. The compressed data is then obtained based on statistical characteristics of the representative values.
FIG. 1 illustrates a general coder which includes an orthogonal transformer 11 for transforming input video data according to the DCT method and producing transformation coefficients, and a quantizer 12 for quantizing the transformation coefficients. A variable length coder 13 compresses the quantized data according to a variable length coding method. The output of the quantizer is further applied to a dequantizer 14 and inverse orthogonal transformer 15 in order to reconstruct frame data, which is stored in a frame memory 16. The reconstructed data is then applied to a motion estimation unit 17 and motion compensator 18 to produce a motion vector MV.
More specifically, video data of an N.times.N block size (generally represented as N.sub.1 .times.N.sub.2 but for convenience N.sub.1 =N.sub.2 =N; N being a pixel unit) is inputted to an adder A1 via an input terminal 10. The block video data and feedback video data, which is applied to the second input of the adder A1, are combined to produce a block of differential data. The differential data is transformed into transformation coefficients in the frequency domain in accordance with a DCT method in the orthogonal transformer 11. The energy components of the transformation coefficients are gathered to a low frequency. A quantizer 12 changes the transformation coefficients into representative values which have a predetermined level, taking the energy level distribution of the transformation coefficients into consideration. A variable length coder 13 further compresses the transmitting data V.sub.CD through variable length coding of the representative values based on statistical characteristics of the representative values.
Generally, there are many similar portions between adjacent frames. In the case where a frame has slight movement relative to an adjacent frame, a motion vector MV is calculated by estimating the amount of motion between the two frames. The block of data is compensated using the motion vector MV to make the differential data small, and thus further compressing the data to be stored or transmitted. To produce such a motion vector, a dequantizer 14 and an inverse orthogonal transformer 15 dequantizes and inverse-transforms the quantization coefficients output from the quantizer 12, thereby transforming the video data back into the spatial domain. The inverse-transformed video data is reconstructed differential data corresponding to the differential data output from the first adder A1. The differential data output from the inverse orthogonal transformer 15 is added by adder A2 to block data fedback, and the sum is stored in a frame memory 16. The frame data is thus reconstructed. A motion estimation unit 17 compares the block data inputted via the input terminal 10 with the block of data stored in the frame memory 16, and calculates a motion vector MV representing motion between the two blocks. The motion vector MV is stored or transmitted to a receiver and is used in by the decoder to reconstruct the original data. The motion vector is also applied to a motion compensator 18, which is connected to frame memory 16 and motion estimation unit 17. The motion compensator 18 reads the N.times.N block of data from the frame memory 16 according to the motion vector MV supplied from the motion estimation unit 17, and supplies them to the first adder A1. As described above, the first adder A1 calculates the differential data between the N.times.N block data supplied from the input terminal 10 and the N.times.N block data supplied from the motion compensator 18.
With further reference to FIG. 1, when the two switches RSW.sub.1, RSW.sub.2 are turned on, the DPCM process is performed, and when the switches are turned off, the PCM (Pulse Code Modulation) data are output by the first and second adders A1, A2.
The coded video data V.sub.CD is stored or transmitted to the receiver. In either event, the coded data is applied to a decoder as shown in FIG. 2. The coded video data V.sub.CD is decoded through an inverse process of the variable length coding by a variable length decoder 21. The data output from the variable length decoder 21 is dequantized to produce transformation coefficients in the frequency domain by a dequantizer 22. An inverse orthogonal-transformer 23 transforms the transformation coefficients in the frequency domain supplied from the dequantizer 22 to video data in the spatial domain. The inverse-transformed video data is reconstructed to produce differential data corresponding to the differential data calculated by the first adder A1 of the coder. The motion vector MV, which is calculated by the motion estimation unit 17 of the coder, is supplied to a motion compensator 24 of the decoder. The motion compensator 24 reads the N.times.N block of data according to the motion vector MV from the frame data, which is stored in the frame memory 25, and supplies them to the adder A. Then, the inverse-transformed differential data and the N.times.N block of data supplied from the motion compensator 24 are combined by the adder A and transmitted to a display unit.
Accordingly, the coder and decoder process active images according to the DPCM method of motion compensation. For a still image or active image which is coded by intraframe coding, the above-described coder and decoder, including the orthogonal transformer 11, quantizer 12, and variable length coder 13 in the coder, and variable length decoder 21, dequantizer 22, and inverse orthogonal transformer 23 in the decoder are sufficient to perform the coding/decoding operation. For example, an electronic camera which uses a disk or a memory IC instead of conventional film, or a device for recording still images in a computer, utilizes a coder and decoder as described above. Incidentally, a still image has similar patterns among several blocks of a frame. For instance, a still image having the sky or sea in the background of a frame, a plurality of adjacent blocks will have similar pattern data.
However, since conventional coding/decoding systems as described above do not correlate among several blocks the similar patterns (e.g., a still image having the sky as background), there are several limitations which prevent the data from being compressed to a maximum.